package kr.hkit.powerjava.chapter22;

public class GenericEx {
	public static void main(String[] args) {
/*		Box b = new Box();
		b.setData(5);
		b.setData("Hello Java");
		
		int data = (int) b.getData();
		System.out.println(data);*/
		
		GenericBox<Integer> gb = new GenericBox<>();
		gb.setData(5);
		System.out.println(gb.getData());
		
		GenericBox<String> gbStr = new GenericBox<>();
		gbStr.setData("Test");
		String str = gbStr.getData();
		System.out.println(str);
	}
}
